package cn.tedu.mintmall.exception;

import cn.tedu.mintmall.restful.ResponseCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务异常
 */
@Data
@EqualsAndHashCode(callSuper = false) // 不会比较其继承的父类的属性可能会导致错误判断；
public class MintmallServiceException extends RuntimeException {

    private ResponseCode responseCode;

    public MintmallServiceException(ResponseCode responseCode, String message) {

        super(message);
        setResponseCode(responseCode);

    }

}
